<template>
    <view class="container">
        <uv-parse container-style='padding: 30rpx' :content='dataContent' lazy-load="true" :tag-style="tagStyle"
            @error='nodeLoadError' @ready='nodeLoadReady' @linktap='tapLink'></uv-parse>
    </view>
</template>

<script>
    import {
        uvparseContent
    } from "./content.js"
    export default {
        data() {
            return {
                dataContent: []
            }
        },
        computed: {
            tagStyle: function() {
                return {
                    a: "color: #ff2525; size: 30rpx; font-weight: 700;",
                    "#test1": "color: blue"
                }
            }
        },
        mounted() {
            setTimeout(() => {
                this.dataContent = uvparseContent;
            }, 300)
            setTimeout(() => {

            }, 1000)
        },
        methods: {
            nodeLoadError(e) {
                console.log("rich text load error", e)
            },
            nodeLoadReady(e) {
                console.log("rich text load ready", e);
            },
            tapLink(e) {
                console.log("tap rich text node", e);
            }
        }
    }
</script>

<style>
    .container {
        color: #333;
        size: 26rpx;
        font-weight: 400;
    }
</style>